package com.winit.cloudlink.mgmt.rabbit;

import com.winit.cloudlink.common.URL;
import com.winit.cloudlink.rabbitmq.mgmt.RabbitMgmtService;
import com.winit.cloudlink.rabbitmq.mgmt.model.Exchange;


/**
 * Created by stvli on 2017/3/31.
 */
public class ExchangeAdmin extends BaseAdmin {
    public ExchangeAdmin(String url) {
        super(url);
    }

    public ExchangeAdmin(URL url) {
        super(url);
    }

    public ExchangeAdmin(RabbitMgmtService rabbitMgmtService, String virtualHost) {
        super(rabbitMgmtService, virtualHost);
    }

    public void declarationExchange(Exchange exchange) {
        rabbitMgmtService.exchanges().create(exchange);
    }
}
